home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1991 / Feb 91 / MacApp.Tech$ 2⁄22⁄91 / 3028-Re Custom MABuild Op-Feb91 < prev    next >
Encoding:
Text File  |  1991-03-06  |  3.5 KB  |  106 lines  |  [TEXT/GEOL]

  1. Item    1770737                         20-Feb-91        09:28PST
  2.  
  3. From:   MHARPER                         Babcock & Brown, Michael Harper,AST
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Item forwarded by       PERRY.G      to PHIL.TH 
  8.  
  9. ------------------------------------------------------------------------------
  10.  
  11. Sub:    RE>Custom MABuild Option
  12.  
  13. Attn: MacApp Developers
  14. SentBy: Michael Harper
  15.         Reply to:   RE>Custom MABuild Option
  16. Ken,
  17.  
  18. Good question.  This will be going into the list of questions I am compiling
  19. for MADA.
  20.  
  21. -----
  22. DISCLAIMER:  I am a C/C++ programmer and thus haven't messed with Pascal in
  23. quite some time.  Please forgive any mistakes in translation as it's the idea
  24. that counts, right?  The C version is first, Pascal version is second.
  25. -----
  26.  
  27. The way to accomplish a custom variable that is controlled by a compiler
  28. option is through conditional compilation.  In C, this means add something
  29. like this to a header file (gleaned from "UMacAppUtilities.h" with a
  30. modification):
  31.  
  32. #if  qDemo
  33. const short qDemo = true;
  34. #else
  35. const short qDemo = false;
  36. #endif
  37.  
  38. ... and then in your YourApp.MAMake file, you would add the following to your
  39. OtherCPlusOptions variable:  "-d qDemo".
  40.  
  41. Now, for Pascal, I'm not sure *WHERE* you'd put the code, but I offer the
  42. following translation into Pascal:
  43. const
  44.    {$IFC qDemo}
  45.       qDemo = true;
  46.    {$ELSEC}
  47.       qDemo = false;
  48.    {$ENDC}
  49.  
  50.    <other constants>
  51.  
  52. Then, in YourApp.MAMake, add the following to the variable OtherPascalOptions:
  53.  "-d qDemo=true"
  54.  
  55. Michael J. Harper
  56. Senior Software Developer
  57. Babcock & Brown, Inc.
  58. AppleLink:  MHARPER
  59. babcock!mharper@uunet.uu.net
  60. --------------------------------------
  61. Date: 2/19/91
  62. To: Michael Harper
  63. From: AnaMatrix, Jerry Sargent,PAS
  64. Custom MABuild Option:
  65.  
  66. In my code I frequently use the statment "If qDebug Then ...;". Is there a way
  67. that I can have my own variable and pass it to the compiler on the MABuild
  68. command line? For example, I would like to define a qDemo variable that will
  69. compile a demo version of my program and create a ".Demo Files" folder for me,
  70. just like it creates ".Debug Files" and ".Non-Debug Files."
  71.  
  72. If you can offer some advice, please link me at address "ENSIGN". Thanks,
  73.  
  74. Ken Auton
  75.  
  76.  
  77. ------------------ RFC822 Header Follows ------------------
  78. Received: by sfmac2sun; 19 Feb 91 20:01:21 U
  79. Received: from uunet.UUCP by babcock.sf.bb.com (4.0/SMI-4.0)
  80.    id AA07620; Tue, 19 Feb 91 20:03:11 PST
  81. Received: from PO2.ANDREW.CMU.EDU by uunet.UU.NET (5.61/1.14) with SMTP
  82.    id AA02405; Tue, 19 Feb 91 22:04:06 -0500
  83. Received: by po2.andrew.cmu.edu (5.54/3.15) id <AA12543> for
  84. babcock!mharper@uunet.uu.net; Tue, 19 Feb 91 22:03:39 EST
  85. Received: via switchmail for macapptech+@andrew.cmu.edu;
  86.  Tue, 19 Feb 91 22:03:33 -0500 (EST)
  87. Received: from po2.andrew.cmu.edu via qmail
  88.           ID </afs/andrew.cmu.edu/service/mailqs/q003/QF.gbkSOPe00jZdAkvk4A>;
  89.           Tue, 19 Feb 91 22:02:02 -0500 (EST)
  90. Received: from apple.com by po2.andrew.cmu.edu (5.54/3.15) id <AA12522> for
  91. macapptech+; Tue, 19 Feb 91 22:01:36 EST
  92. Received: from [90.1.0.10] by apple.com with SMTP (5.61/25-eef)
  93.    id AA06764; Tue, 19 Feb 91 18:49:25 -0800
  94.    for macapptech+@andrew.cmu.edu
  95. Received: by goofy.apple.com (5.61/25-eef)
  96.    id AA02513; Tue, 19 Feb 91 18:41:46 -0800
  97.    for
  98. Message-Id: <6611496@AppleLink.Apple.COM>
  99. Subject: Custom MABuild Option?
  100. To: MACAPP.TECH$@applelink.apple.com (MacApp Technical)
  101. From: uunet!applelink.apple.com!ENSIGN (AnaMatrix, Jerry Sargent,PAS)
  102. Date: 19 Feb 91 23:21 GMT
  103.  
  104.  
  105.  
  106.